package com.luoying.itew.http;

/**
 * 后台协议基类
 * resultEntity可能为NULL
 * @param <T>
 */
public class BaseResponse<T> {
    /**
     * 返回成功
     */
    private int resultCode = -1;
    private T resultEntity;
    private String resultMessage;

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public T getResultEntity() {
        return resultEntity;
    }

    public void setResultEntity(T resultEntity) {
        this.resultEntity = resultEntity;
    }

    public String getResultMessage() {
        return resultMessage;
    }

    public void setResultMessage(String resultMessage) {
        this.resultMessage = resultMessage;
    }

    public boolean isOk(){
        return resultCode==0;
    }

}
